import java.math.BigInteger;
object go_kt:org.neo.smartcontract.framework.SmartContract()
{

        public fun Main(): Int {
            var b= str_Equal("abcd");
            if(b)return 7;
            return 3;
        }
    public fun str_Equal(a:String):Boolean
    {
        var b =  a=="abcd";
        return b;
    }
    public fun testAsLong():Long
    {
        var a=1;
        return testLong(a as Long);
    }
    public  fun testLong(n:Long):Long
    {
        return n;
    }
    public  fun testBN()
    {
        testBN2(null);
    }
    public  fun testBN2(f:Long?):Long
    {
        val FEE = BigInteger.valueOf(1);
        val fee = FEE.multiply(BigInteger.valueOf(f ?: 15))  // <- happens here
        return   fee.toLong();
    }
//    public fun testSw():Int
//    {
//        var i =5;
//        when(i)
//        {
//            1->return 13;
//            5->return 15;
//            7->return 77;
//
//        }
//        return 0;
//    }
//    public fun testSwStr():Int
//    {
//        var i ="27";
//        when(i)
//        {
//            "1"->return 13;
//            "5"->return 15;
//            "7"->return 77;
//            ""->return 99;
//        }
//        return 0;
//    }
    public  fun TestBA():Byte
{
    var ba = byteArrayOf(131 as Byte,222 as Byte,3);
    return TakeFrom(ba);
}
public  fun  TestBA2():Byte
{
    var ba =byteArrayOf(0);
    return  TakeFrom(ba);
}

fun TakeFrom(input: ByteArray?): Byte {
    val take = input!![0]
    return take
}
    const val field1 = "Nihao";
    fun testConst():Any
    {
        return field1;
    }
    public fun ttt(a:String):Boolean
    {
        if(str_Equal("99"))
            return  false;
        return true;
    }
}